package xyz.chaobei;

/**
 * @copyright (C), 2015-2020
 * @fileName: LocalVariable
 * @author: MRC
 * @date: 2021/1/8 7:25
 * @description:
 */
public class LocalVariableTest {

    public static void main(String[] args) {

        int count = 5;
        double sum = 2.0D;

        MovingAverage mo = new MovingAverage(count, sum);

        int[] array = {1, 2, 3};

        // execute for
        for (int i : array) {
            mo.submit(i);
        }
        // add
        double a = mo.add();

        // avg
        double b = mo.avg();
    }

}
